﻿using System;

namespace Salary.Domain
{
    public class Payment : Entity
    {
        private Employee _employee;
        private DateTime _date;
        private DateTime _dateFrom;
        private DateTime _dateTo;
        private decimal _summ;
        private decimal _tax;
        private string _information;

        #region Constructor

        protected Payment()
        {
            
        }
        public Payment(Employee employee, DateTime date, DateTime dateFrom, DateTime dateTo, decimal summ, string information)
        {
            _employee = employee;
            _date = date;
            _dateFrom = dateFrom;
            _dateTo = dateTo;
            _summ = summ;
            _tax = summ * 0.13m;
            _information = information;
        }
        #endregion

        #region Properties

        public virtual Employee Employee
        {
            get { return _employee; }
            set { _employee = value; }
        }
        public virtual DateTime Date
        {
            get { return _date; }
            set { _date = value; }
        }
        public virtual DateTime DateFrom
        {
            get { return _dateFrom; }
            set { _dateFrom = value; }
        }
        public virtual DateTime DateTo
        {
            get { return _dateTo; }
            set { _dateTo = value; }
        }
        public virtual decimal Summ
        {
            get { return _summ; }
            set { _summ = value; }
        }
        public virtual decimal Tax
        {
            get { return _tax; }
            set { _tax = value; }
        }
        public virtual string Information
        {
            get { return _information; }
            set { _information = value; }
        }
        #endregion
    }
}
